﻿using UnityEngine;
using System.Collections;

public class Horse : MonoBehaviour 
{	
	public float m_Speed;
	// Use this for initialization
	
	// Update is called once per frame
	void Update () 
	{
		HorseMoves();
	}
	void HorseMoves()
	{
		if(Input.GetKey(KeyCode.UpArrow))
		{
			transform.position += new Vector3(0,m_Speed*Time.deltaTime, 0);
		}
		
		if(Input.GetKey(KeyCode.DownArrow))
		{
			transform.position -= new Vector3(0,m_Speed*Time.deltaTime,0);
		}
		
		if(Input.GetKey(KeyCode.LeftArrow))
		{
			transform.position -= new Vector3(m_Speed*Time.deltaTime, 0, 0);
		}
		if(Input.GetKey(KeyCode.RightArrow))
		{
			transform.position += new Vector3(m_Speed*Time.deltaTime, 0, 0);
		}
	}			
}